package com.hoshiicloud.goods.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.query.OmnipotentParam;
import com.hoshiicloud.common.update.UpdateBatchParam;
import com.hoshiicloud.goods.entity.spu.BaseSpu;


import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-04
 */
public interface BaseSpuService extends IService<BaseSpu> {

    BaseSpu getById(Long id);

    boolean save(BaseSpu entity);

    boolean updateById(BaseSpu entity);

    Page getPage(IPage page, Wrapper queryWrapper, String key);

    boolean deleteById(Long id);

    List<BaseSpu> getByIds(List<Long> ids, String key);

    /**
     * 多条件批量查询
     */
    List<BaseSpu> listBaseSpu(BaseSpu baseSpu);

    BaseSpu saveBaseSpu(BaseSpu entity);

    /**
     * 根据自定义条件进行批量更新
     */
    Boolean updateBatchByWrapper(UpdateBatchParam<BaseSpu> updateBatchParam);

    /**
     * 批量更新
     */
    Boolean updateBatch(OmnipotentParam<BaseSpu> param);
}
